# Copyright (c) 2018, Gary Huang, deepkh@gmail.com, https://github.com/deepkh
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#!/bin/bash

if [ ! -z "$1" ]; then
	unset LIBJSONCPP_PHONY
	unset LIBJSONCPP_PHONY_CLEAN
	if [ "${HAVE_LIB_JSONCPP}" = "1" ]; then
		export LIBJSONCPP_NAME="libjsoncpp"
		export LIBJSONCPP="$1"
		export LIBJSONCPP_OBJS_DIR=${RUNTIME_OBJS}${LIBJSONCPP/${ROOT}/""}
		export LIBJSONCPP_DLL="${RUNTIME_DLL}/${LIBJSONCPP_NAME}.${DLLSUFFIX}"
		export LIBJSONCPP_DLL_CLEAN="${LIBJSONCPP_DLL}_clean"
		export LIBJSONCPP_PHONY="LIBJSONCPP"
		export LIBJSONCPP_PHONY_DEV="LIBJSONCPP_DEV"
		export LIBJSONCPP_PHONY_CLEAN="LIBJSONCPP_CLEAN"
		export LIBJSONCPP_CFLAGS=-I${LIBJSONCPP}/../../include
		export LIBJSONCPP_LDFLAGS=-ljsoncpp${LDLLSUFFIX}
		echo "LIBJSONCPP=${LIBJSONCPP}"
	fi
fi


